<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="state" styleClass="edit">

        <rich:panel>
            <f:facet name="header">#{stateHome.managed ? 'Edit' : 'Add'} State</f:facet>




            <s:decorate id="nameField" template="layout/edit.xhtml">
                <ui:define name="label">Name</ui:define>
                <h:inputTextarea id="name"
                               cols="80"
                               rows="2"
                           required="true"
                              value="#{stateHome.instance.name}"/>
            </s:decorate>


            <s:decorate id="codeField" template="layout/edit.xhtml">
                <ui:define name="label">Code</ui:define>
                <h:inputText id="code"
                           size="45"
                      maxlength="45"
                          value="#{stateHome.instance.code}">
                    <a:support event="onblur" reRender="codeField" bypassUpdates="true" ajaxSingle="true"/>
                </h:inputText>
            </s:decorate>






            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{stateHome.persist}"
                       disabled="#{!stateHome.wired}"
                       rendered="#{!stateHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{stateHome.update}"
                       rendered="#{stateHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{stateHome.remove}"
                      immediate="true"
                       rendered="#{stateHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/State.xhtml"
                rendered="#{stateHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty stateFrom ? 'StateList' : stateFrom}.xhtml"
                rendered="#{!stateHome.managed}"/>

        </div>
    </h:form>

<rich:tabPanel switchType="ajax">

    <rich:tab label="Country *" labelClass="required">
    <div class="association" id="countryParent">

        <h:outputText value="There is no country associated with this state."
                   rendered="#{stateHome.instance.country == null}"/>

        <rich:dataTable var="_country"
                   value="#{stateHome.instance.country}"
                rendered="#{stateHome.instance.country != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="countryTable">
            <h:column>
                <f:facet name="header">Id country</f:facet>
                <h:outputText value="#{_country.idCountry}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_country.name}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Code</f:facet>
                <h:outputText value="#{_country.code}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{stateHome.instance.country != null ? 'changeParent' : 'selectParent'}" value="#{stateHome.instance.country != null ? 'Change' : 'Select'} country"
                       view="/CountryList.xhtml">
                <f:param name="from" value="StateEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Requests for from state">
        <h:form styleClass="association" id="requestsForFromStateChildren">

            <h:outputText value="There are no requestsForFromState associated with this state."
                       rendered="#{empty stateHome.requestsForFromState}"/>

            <rich:dataTable value="#{stateHome.requestsForFromState}"
                           var="_request"
                      rendered="#{not empty stateHome.requestsForFromState}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="requestsForFromStateTable">
                <rich:column sortBy="#{_request.idRequest}">
                    <f:facet name="header">Id request</f:facet>
                    <h:outputText value="#{_request.idRequest}"/>
                </rich:column>
                <rich:column sortBy="#{_request.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_request.name}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_request.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_request.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_request.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_request.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_request.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_request.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_request.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_request.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_request.singleDay}"/>
                </rich:column>
                <rich:column sortBy="#{_request.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_request.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_request.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_request.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_request.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_request.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_request.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_request.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_request.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_request.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_request.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_request.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_request.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{stateHome.managed}" id="requestsForFromState">
        <div class="actionButtons">
            <s:button id="addrequest"
                   value="Add request"
                    view="/RequestEdit.xhtml"
             propagation="none">
                 <f:param name="stateIdState"
                         value="#{stateHome.instance.idState}"/>
                 <f:param name="requestFrom" value="State"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Travels for to state">
        <h:form styleClass="association" id="travelsForToStateChildren">

            <h:outputText value="There are no travelsForToState associated with this state."
                       rendered="#{empty stateHome.travelsForToState}"/>

            <rich:dataTable value="#{stateHome.travelsForToState}"
                           var="_travel"
                      rendered="#{not empty stateHome.travelsForToState}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="travelsForToStateTable">
                <rich:column sortBy="#{_travel.idTravel}">
                    <f:facet name="header">Id travel</f:facet>
                    <h:outputText value="#{_travel.idTravel}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_travel.name}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_travel.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_travel.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_travel.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_travel.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_travel.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.travelState}">
                    <f:facet name="header">Travel state</f:facet>
                    <h:outputText value="#{_travel.travelState}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.calculatedRate}">
                    <f:facet name="header">Calculated rate</f:facet>
                    <h:outputText value="#{_travel.calculatedRate}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_travel.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_travel.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_travel.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_travel.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_travel.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_travel.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_travel.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_travel.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_travel.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_travel.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_travel.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_travel.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_travel.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_travel.singleDay}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{stateHome.managed}" id="travelsForToState">
        <div class="actionButtons">
            <s:button id="addtravel"
                   value="Add travel"
                    view="/TravelEdit.xhtml"
             propagation="none">
                 <f:param name="stateIdState"
                         value="#{stateHome.instance.idState}"/>
                 <f:param name="travelFrom" value="State"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Cities">
        <h:form styleClass="association" id="citiesChildren">

            <h:outputText value="There are no cities associated with this state."
                       rendered="#{empty stateHome.cities}"/>

            <rich:dataTable value="#{stateHome.cities}"
                           var="_city"
                      rendered="#{not empty stateHome.cities}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="citiesTable">
                <rich:column sortBy="#{_city.idCity}">
                    <f:facet name="header">Id city</f:facet>
                    <h:outputText value="#{_city.idCity}"/>
                </rich:column>
                <rich:column sortBy="#{_city.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_city.name}"/>
                </rich:column>
                <rich:column sortBy="#{_city.lat}">
                    <f:facet name="header">Lat</f:facet>
                    <h:outputText value="#{_city.lat}"/>
                </rich:column>
                <rich:column sortBy="#{_city.lon}">
                    <f:facet name="header">Lon</f:facet>
                    <h:outputText value="#{_city.lon}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{stateHome.managed}" id="cities">
        <div class="actionButtons">
            <s:button id="addcity"
                   value="Add city"
                    view="/CityEdit.xhtml"
             propagation="none">
                 <f:param name="stateIdState"
                         value="#{stateHome.instance.idState}"/>
                 <f:param name="cityFrom" value="State"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Requests for to state">
        <h:form styleClass="association" id="requestsForToStateChildren">

            <h:outputText value="There are no requestsForToState associated with this state."
                       rendered="#{empty stateHome.requestsForToState}"/>

            <rich:dataTable value="#{stateHome.requestsForToState}"
                           var="_request"
                      rendered="#{not empty stateHome.requestsForToState}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="requestsForToStateTable">
                <rich:column sortBy="#{_request.idRequest}">
                    <f:facet name="header">Id request</f:facet>
                    <h:outputText value="#{_request.idRequest}"/>
                </rich:column>
                <rich:column sortBy="#{_request.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_request.name}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_request.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_request.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_request.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_request.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_request.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_request.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_request.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_request.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_request.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_request.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_request.singleDay}"/>
                </rich:column>
                <rich:column sortBy="#{_request.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_request.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_request.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_request.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_request.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_request.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_request.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_request.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_request.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_request.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_request.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_request.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_request.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_request.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_request.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{stateHome.managed}" id="requestsForToState">
        <div class="actionButtons">
            <s:button id="addrequest"
                   value="Add request"
                    view="/RequestEdit.xhtml"
             propagation="none">
                 <f:param name="stateIdState"
                         value="#{stateHome.instance.idState}"/>
                 <f:param name="requestFrom" value="State"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Travels for from state">
        <h:form styleClass="association" id="travelsForFromStateChildren">

            <h:outputText value="There are no travelsForFromState associated with this state."
                       rendered="#{empty stateHome.travelsForFromState}"/>

            <rich:dataTable value="#{stateHome.travelsForFromState}"
                           var="_travel"
                      rendered="#{not empty stateHome.travelsForFromState}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="travelsForFromStateTable">
                <rich:column sortBy="#{_travel.idTravel}">
                    <f:facet name="header">Id travel</f:facet>
                    <h:outputText value="#{_travel.idTravel}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.name}">
                    <f:facet name="header">Name</f:facet>
                    <h:outputText value="#{_travel.name}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLat}">
                    <f:facet name="header">From lat</f:facet>
                    <h:outputText value="#{_travel.fromLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.fromLon}">
                    <f:facet name="header">From lon</f:facet>
                    <h:outputText value="#{_travel.fromLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLat}">
                    <f:facet name="header">To lat</f:facet>
                    <h:outputText value="#{_travel.toLat}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.toLon}">
                    <f:facet name="header">To lon</f:facet>
                    <h:outputText value="#{_travel.toLon}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.distance}">
                    <f:facet name="header">Distance</f:facet>
                    <h:outputText value="#{_travel.distance}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.travelState}">
                    <f:facet name="header">Travel state</f:facet>
                    <h:outputText value="#{_travel.travelState}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.calculatedRate}">
                    <f:facet name="header">Calculated rate</f:facet>
                    <h:outputText value="#{_travel.calculatedRate}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.createDate}">
                    <f:facet name="header">Create date</f:facet>
                    <h:outputText value="#{_travel.createDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.modifyDate}">
                    <f:facet name="header">Modify date</f:facet>
                    <h:outputText value="#{_travel.modifyDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.deleteDate}">
                    <f:facet name="header">Delete date</f:facet>
                    <h:outputText value="#{_travel.deleteDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.cronExpression}">
                    <f:facet name="header">Cron expression</f:facet>
                    <h:outputText value="#{_travel.cronExpression}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.monday}">
                    <f:facet name="header">Monday</f:facet>
                    <h:outputText value="#{_travel.monday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.tuesday}">
                    <f:facet name="header">Tuesday</f:facet>
                    <h:outputText value="#{_travel.tuesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.wednesday}">
                    <f:facet name="header">Wednesday</f:facet>
                    <h:outputText value="#{_travel.wednesday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.thursday}">
                    <f:facet name="header">Thursday</f:facet>
                    <h:outputText value="#{_travel.thursday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.friday}">
                    <f:facet name="header">Friday</f:facet>
                    <h:outputText value="#{_travel.friday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.saturday}">
                    <f:facet name="header">Saturday</f:facet>
                    <h:outputText value="#{_travel.saturday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.sunday}">
                    <f:facet name="header">Sunday</f:facet>
                    <h:outputText value="#{_travel.sunday}"/>
                </rich:column>
                <rich:column sortBy="#{_travel.beginDate}">
                    <f:facet name="header">Begin date</f:facet>
                    <h:outputText value="#{_travel.beginDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.endDate}">
                    <f:facet name="header">End date</f:facet>
                    <h:outputText value="#{_travel.endDate}">
                        <s:convertDateTime type="both" dateStyle="short"/>
                    </h:outputText>
                </rich:column>
                <rich:column sortBy="#{_travel.singleDay}">
                    <f:facet name="header">Single day</f:facet>
                    <h:outputText value="#{_travel.singleDay}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{stateHome.managed}" id="travelsForFromState">
        <div class="actionButtons">
            <s:button id="addtravel"
                   value="Add travel"
                    view="/TravelEdit.xhtml"
             propagation="none">
                 <f:param name="stateIdState"
                         value="#{stateHome.instance.idState}"/>
                 <f:param name="travelFrom" value="State"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
